const fs = require("fs");
const path = require("path");

async function run() {
  const target = path.join("./", "dist");

  try {
    await fs.promises.rmdir(target, { recursive: true });
  } catch (err) {

  }
  await fs.promises.mkdir(target);

  await fs.promises.copyFile(path.join("./", 'index.html'), path.join(target, 'index.html'))
}

run();
